package one;

import java.text.DecimalFormat;
import java.util.*;

public class test9716 {
    public static void main(String[] args) {
        //构造方法的字符格式这里如果小数不足2位,会以0补足.
        DecimalFormat decimalFormat = new DecimalFormat(".00");
        ArrayList<reference> arrayList = new ArrayList<>();
        ArrayList<Float> xList = new ArrayList<>();
        ArrayList<Float> yList = new ArrayList<>();
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        for (int i = 0; i < n; i++) {
            float x1 = scanner.nextFloat();
            float y1 = scanner.nextFloat();
            float x2 = scanner.nextFloat();
            float y2 = scanner.nextFloat();
            arrayList.add(new reference(x1, x2, y1, y2));
            xList.add(x1);
            xList.add(x2);
            yList.add(y1);
            yList.add(y2);
        }
//        排序
        Collections.sort(xList,(o1, o2) -> {
            if(o1-o2>0.0){
                return 1;
            }else if(o1-o2==0.0){
                return 0;
            }else {
                return -1;
            }
        });

        Collections.sort(yList, (o1, o2) -> {
            if(o1-o2>0.0){
                return 1;
            }else if(o1-o2==0.0){
                return 0;
            }else {
                return -1;
            }
        });

        float sum = 0;
        for (int i = 0; i < xList.size() - 1; i++) {
            for (int y = 0; y < yList.size() - 1; y++) {
                float x1 = xList.get(i);
                float y1 = yList.get(y);
                float x2 = xList.get(i + 1);
                float y2 = yList.get(y + 1);
                for (int k = 0; k < arrayList.size(); k++) {
                    float x11 = arrayList.get(k).getX1();
                    float y11 = arrayList.get(k).getY1();
                    float x22 = arrayList.get(k).getX2();
                    float y22 = arrayList.get(k).getY2();
                    if (x1 >= x11 && x2 <= x22 & y1 >= y11 && y2 <= y22) {
                        sum = (x2 - x1) * (y2 - y1) + sum;
                        break;
                    }
                }
            }
        }
        System.out.println(decimalFormat.format(sum));
    }

    static class reference {
        private float x1;
        private float x2;
        private float y1;
        private float y2;

        public reference(float x1, float x2, float y1, float y2) {
            this.x1 = x1;
            this.x2 = x2;
            this.y1 = y1;
            this.y2 = y2;
        }

        public float getX1() {
            return x1;
        }

        public float getX2() {
            return x2;
        }

        public float getY1() {
            return y1;
        }

        public float getY2() {
            return y2;
        }
    }
}
